class Geozone {
    static belongsTo = [devicegroup: Devicegroup]
    static hasMany = [points: Point]
    static fetchMode = [points: "eager"]
    
    //	 Fields
    // int clientUpload; // upload this geozone to the client device?
    // int clientId; // unique numeric ID for this geozone
    // int reverseGeocode;// apply this description as a custom reverse geocode?

    String toString(){
          return this.zoneType+"-"+this.id
    }

    String zoneType = "";
    String streetAddress = '';
    String city = '';
    String stateProvince = '';
    String postalCode = '';
    String country = '';

    String description = '';

    Date lastUpdated
    Date dateCreated
    String geozoneNotifyType = "leave"; //"enter" "leave"
    static constraints = {
        //zoneType(inList:["Circle","Rectangle","Triangle","Polygon"])
        geozoneNotifyType(inList: ["enter", "leave"])
        description()
    }

}
